package com.molichuxing.gateway.bff.orders.entity.response;

import com.molichuxing.framework.dto.ResponseRootDto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 订单加购、续订检验返回vo
 * 
 * @author zoumingyu
 * @date 2019年9月26日
 *
 */
@Data
public class ReletVerifyVo extends ResponseRootDto {
	private static final long serialVersionUID = 1645976038374571970L;

	@ApiModelProperty(value = "是否可续租/加购(0：不可续租/加购(去支付)，1：可续租/加购(去选择商品页))")
	private Integer isRelet;

	@ApiModelProperty(value = "提示语")
	private String message;

	@ApiModelProperty(value = "支付订单号")
	private Long orderCode;

	public ReletVerifyVo() {
	}

	public ReletVerifyVo(Boolean isRelet, String message, Long orderCode) {
		this.isRelet = isRelet ? 1 : 0;
		this.message = message;
		this.orderCode = orderCode;
	}

	/**
	 * 可续租/加购
	 * 
	 * @return
	 */
	public ReletVerifyVo can() {
		this.isRelet = 1;
		return this;
	}

	/**
	 * 不可续租/加购
	 * 
	 * @return
	 */
	public ReletVerifyVo cannot(String message, Long orderCode) {
		this.isRelet = 0;
		this.message = message;
		this.orderCode = orderCode;
		return this;
	}

}
